<template>
    <div class="dayu-container">
        <InputNumber class="dayu" :value="dayuVal"></InputNumber>
    </div>
</template>

<style scoped>
.dayu{
    width:100px;
}
.dayu-container{
    display:inline-block;
}
</style>

<script>
export default {
    name: 'DaYu',
    props:['val'],
    computed: {
        dayuVal: function(){
            let result = 0;
            if(this.val){
                // 字符串包含判断工具(gt)的determinationData格式为{"gt":23}
                let valObj = JSON.parse(this.val);
                if(valObj.gt){
                    result = valObj.gt
                }
            }
            return result;
        }
    }
}
</script>
